package de.midnightdance.admin;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import de.midnightdance.admin.bund.ViewBuende;
import de.midnightdance.admin.clan.ViewClans;
import de.midnightdance.admin.disziplin.ViewDisziplin;
import de.midnightdance.admin.jagdTechnik.ViewJagdTechniken;
import de.midnightdance.admin.ritual.ViewRituale;
import de.midnightdance.admin.user.ViewUser;
import de.midnightdance.admin.vorteile.ViewVorteile;

public class Perspective implements IPerspectiveFactory {

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);		
		//TODO when dynamically adding views via plugIns, then we need to do a different layout, because
		//we do not know which and how many views we have
		layout.addPlaceholder(ViewUser			.ID, IPageLayout.RIGHT	,0.3f	,editorArea);
		layout.addPlaceholder(ViewVorteile		.ID, IPageLayout.RIGHT	,0.4f	,ViewUser		.ID);
		
		layout.addPlaceholder(ViewDisziplin 	.ID, IPageLayout.BOTTOM	,0.45f	,ViewUser		.ID);		
		layout.addPlaceholder(ViewBuende		.ID, IPageLayout.RIGHT	,0.5f	,ViewVorteile	.ID);
		
		layout.addPlaceholder(ViewRituale		.ID, IPageLayout.BOTTOM	,0.6f	,ViewVorteile	.ID);
		layout.addPlaceholder(ViewClans			.ID, IPageLayout.BOTTOM	,0.3f	,ViewBuende		.ID);
		layout.addPlaceholder(ViewJagdTechniken	.ID, IPageLayout.BOTTOM	,0.4f	,ViewClans		.ID);	
	}
}
